﻿@{
    string orderCode = Session["OrderCode"] as String;

    string dateFormat = "dd/MM/yyyy - hh:mm tt";

    int receiverId = ViewBag.ReceiverId;

    ViewBag.Title = "Thanh toán";
}

<div id="payment" class="index">
    <div class="container">
        <div class="bg-content">
            <div class="form-group">
                <a href="/">
                    <img src="~/img/logo.png" height="80" class="hidden-xs" />
                </a>
                <div class="pull-right text-right hidden-xs">
                    <div class="ordertime">
                        @DateTime.Now.ToString(dateFormat)
                    </div>
                    <div class="ordercode">
                        <span class="label label-primary">@orderCode</span>
                    </div>
                </div>
                <div class="visible-xs">
                    <div class="ordertime">
                        @DateTime.Now.ToString(dateFormat)
                    </div>
                    <div class="ordercode">
                        <span class="label label-primary">@orderCode</span>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="bg-title">
                        <h5>Thông tin người đặt hàng</h5>
                    </div>
                    <div id="pv-sender">
                        <!-- Ajax: Sender -->
                        <div class="form-loading">
                            <img src="~/img/loading.gif" />
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="bg-title">
                        <h5>Thông tin người nhận hàng</h5>
                    </div>
                    <div id="pv-receiver">
                        <!-- Ajax: Receiver -->
                        <div class="form-loading">
                            <img src="~/img/loading.gif" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg-title">
                <h5>Thông tin đơn hàng</h5>
            </div>
            <div id="pv-details">
                <!-- Ajax: ShoppingCart -->
                <div class="form-loading">
                    <img src="~/img/loading.gif" />
                </div>
            </div>
        </div>
        @using (Html.BeginForm("Checkout", "Payment", FormMethod.Post, new { id = "frmCheckout" }))
        {
            @Html.Hidden("ReceiverId", receiverId)
            @Html.Hidden("AgainLink", Request.Url.AbsoluteUri)

            <div id="pv-onepay">
                <!-- Ajax: OnePay -->
                <div class="form-loading">
                    <img src="~/img/loading.gif" />
                </div>
            </div>
        }
    </div>
</div>
<br />

@section scripts{
    <script>
        new Payment().Index(@receiverId);
    </script>
}